using System.IO;
using NFreeMarker.Core;

namespace NFreeMarker.Template
{
    /**
     * An API for objects that handle exceptions that are thrown during
     * template rendering.
     * @author <a href="mailto:jon@revusky.com">Jonathan Revusky</a>
     */

    public interface ITemplateExceptionHandler
    {
        /**
    	  * handle the exception.
    	  * @param te the exception that occurred.
    	  * @param env The environment object that represents the rendering context
    	  * @param out the character output stream to output to.
    	  */
        void HandleTemplateException(TemplateException te, Environment env, TextWriter output);
    }
}